<template>
  <div>
    <Rotation/>
    <Button />
    <template v-for="(item) in center">
      <Content  :props="item" :key="item.id"/>
    </template>
  </div>
</template>

<script>
import axios from 'axios'
axios.defaults.baseURL = 'https://api.hongbeibang.com/v2'
import Rotation from "../../components/Rotation";
import Button from "../../components/Button";
import Content from "../../components/Content";


export default {
  data() {
    return {
        center:[]
    };
  },
  async created() {
    // 发起网络请求
    const url= 'https://api.hongbeibang.com/v2/feed/getNew?_t=1607084918398&pageIndex=0&pageSize=10&all=true&timestamp=1607084918398'

    // axios.get(url).then((res)=>{
    //   this.center = res.data.data.content
    //   console.log(this.center)
    // });
    let res = await axios.get(url);
    // console.log();
    this.center = res.data.content
  },
  

  components: {
    Rotation,
    Button,
    Content
  },
};
</script>

<style lang="scss" scoped>
</style>
